﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Shl01.Models
{
    public class BLLModel
    {

        public string TypeName { get; set; }//表名
        public string PrimaryName { get; set; }//主键名
        public string DBName { get; set; }//数据库名

        public string GetStr()
        {
            string str = "";
            str = @"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using " + DBName + @".IBLL;
using " + DBName + @".IDAL;
using " + DBName + @".Model;

namespace " + DBName + @".BLL
{
    public class " + TypeName + @"Manager : BaseManager<" + TypeName + @">,I" + TypeName + @"Manager
    {
        private I" + TypeName + @"Service d = DALContainer.Container.Resolve<I" + TypeName + @"Service>();
        public override void SetDal()
        {
            Dal = d;
        }
    }
}
";
            str = str.Replace("Grade", TypeName);
            return str.Replace("'", "\"");
        }
    }
}
